<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="/${initParam.context_root }/script/member_script.js"></script>
<script type="text/javascript">
	onload = function() { // 페이지가 로드되면 자동으로 실행
		var gender = document.form.gender;
		var gen = "${sessionScope.login_info.gender}";
		if (gen == "m") {
			gender[0].checked = true; // 배열로 표시가능
		} else {
			gender[1].checked = true;
		}
	}
</script>
<link href="/${initParam.context_root }/css/starter-template2.css" rel="stylesheet">
<link href="/${initParam.context_root }/css/login-form.css" rel="stylesheet">
<body>
	<div class="container">
	
		<div class="starter-template">
		
<form name="form" method="post" class="register" action="/${initParam.context_root }/member/login/modify.do" onsubmit="return FormCheck(this);">

	<input type="hidden" name="id" value="${sessionScope.login_info.id }">
	<input type="hidden" name="nickname" value="${sessionScope.login_info.nickname }">
	<input type="hidden" name="name" value="${sessionScope.login_info.name }">

		<h1>modification</h1>
		<br>
		<fieldset class="row1">
			<legend>기본정보</legend>
			<p  id="idid">
						<label>ID</label><label  style="text-align:right; padding-left:20px; width:85px">${sessionScope.login_info.id }</label>
					</p>
					<p>
						<label>E-mail</label><input type="text" name="email" style="text-align:right; padding-right:15px;" value="${sessionScope.login_info.email }">
					</p>
					<p>
						<label>비밀번호</label><input type="password" name="password"> <label style="width:100px; padding-right:15px;">비밀번호 확인</label><input type="password"
							name="password_check">
					</p>
				</fieldset>

				<fieldset class="row1">
					<legend>상세 정보</legend>
					<p>
						<label>이름</label> <label style="text-align:right; padding-left:20px; width:85px">${sessionScope.login_info.name }</label>
						<label style="width:155px; padding-right:15px;">성별</label>
						<label id="gender">남성</label><input type="radio" value="m" name="gender" />
						<label id="gender">여성</label><input type="radio" value="f" name="gender" />
					</p>
					<p id="nick">
						<label>닉네임</label> <input type="text" name="nickname" style="text-align:right; padding-right:15px;" value="${sessionScope.login_info.nickname }" onkeyup="checkNickName(this);" id="nickname"><span
							id="nickCheck_message"></span>
					</p>
					<p id="birth">
						<label>생년월일</label> <input type="text" name="birth" style="text-align:right; padding-right:15px;" value="${sessionScope.login_info.birth }" maxlength="8">ex. 19990101
					</p>
					<p>
						<label>H.P</label>
						<select name="hp1"style="text-align:right; width:59px">
					<option value="">${requestScope.hp1 }</option>
					<option value="0">-----</option>
					<option value="010">010</option>
					<option value="011">011</option>
					<option value="016">016</option>
					<option value="017">017</option>
					<option value="070">070</option>
					</select> <input type="text" name="hp2" size="5" style="text-align:right; padding-right:15px; width:85px" value="${requestScope.hp2}" maxlength="4"> 
						<input type="text" name="hp3" style="text-align:right; padding-right:15px; width:85px"  value="${requestScope.hp3}" maxlength="4" > 
						<input	type="hidden" name="hp">
					</p>
					<p>
						<label>주소</label> <input type="text" name="city" style="text-align:right; padding-right:15px; width:117px" value="${sessionScope.login_info.city }" size="5" placeholder="시/도">&nbsp; 
						<input type="text" name="town" style="text-align:right; padding-right:15px; width:117px" value="${sessionScope.login_info.town }" size="5" placeholder="구/군">
					</p>
				</fieldset>
				<fieldset class="row1">
					<legend>자기소개</legend>
					<p>
						<textarea cols="110" rows="6" name="selfIntroduction" placeholder="자신의 매력을 뽐내주세요!">${sessionScope.login_info.selfIntroduction }</textarea>
					</p>
					<legend>가입일</legend>
					<p>${sessionScope.login_info.joinDate }</p>
				</fieldset>
				
					<input type="submit" value="수정" id="sub" class="btn btn-success"> <input type="reset" value="다시작성" class="btn btn-warning" id="sub">
			
			
			
			
			
	<%-- 		<p id="idid">
			<td>${sessionScope.login_info.id }</td>
		</tr>
		<tr>
			<td>비밀번호</td>
			<td><input type="password" name="password"></td>
		</tr>
		<tr>
			<td>비빌번호 확인</td>
			<td><input type="password" name="password_check"></td>
		</tr>
		<tr>
			<td>닉네임</td>
			<td>${sessionScope.login_info.nickname}</td>
		</tr>
		<tr>
			<td>이름</td>
			<td>${sessionScope.login_info.name }</td>
		</tr>
		<tr>
			<td>성별</td>
			<td><input type="radio" name="gender" value="m"> 남
					<input type="radio" name="gender" value="f"> 여</td>
		</tr>
		<tr>
			<td>생년월일</td>
			<td><input type="text" name="birth" value="${sessionScope.login_info.birth}">ex. 19990101</td>
		</tr>
		<!-- 핸드폰 번호 -->
		<tr>
			<td>H.P</td>
			<td><select name="hp1">
					<option value="">${requestScope.hp1 }</option>
					<option value="0">-----</option>
					<option value="010">010</option>
					<option value="011">011</option>
					<option value="016">016</option>
					<option value="017">017</option>
					<option value="070">070</option>
			</select> &nbsp;-&nbsp;<input type="text" name="hp2" size="2" value="${requestScope.hp2 }">&nbsp;-&nbsp;
				<input type="text" name="hp3" size="2" value="${requestScope.hp3 }"></td>
			<td><input type="hidden" name="hp"></td>
		</tr>
		<tr>
			<td>
				<label>E-mail</label><input type="text" name="email">
			</td>
		</tr>
		<td></td>
		<td>비밀번호 재설정시 이메일 주소가 필요합니다. 정확히 작성을 해주시기 바랍니다.
			 ex) topgay1@topgay.com</td>
		<tr>
			<td>주소</td>
			<td>시/도<input type="text" name="city" size="5" value="${sessionScope.login_info.city}">&nbsp;
					구/군<input type="text" name="town" size="5" value="${sessionScope.login_info.town}"></td>
		</tr>
		<tr>
			<td>자기소개</td>
			<td colspan="3"><textarea cols="50" rows="3" name="selfIntroduction"
										>${sessionScope.login_info.selfIntroduction}</textarea></td>
		</tr> --%>
	<%-- 	<tr>
			<td align="left">가입일</td>
			<td>${sessionScope.login_info.joinDate }</td>
		</tr>
		<tr>
			<td colspan="2" align="center"><input type="submit" value="수정">
				<input type="reset" value="다시작성"></td>
		</tr> --%>
		
			</form>
			
		</div>
		
	</div>
	
</body>


